//
//  POIFinder.h
//  iPath
//
//  Created by Ramindu Weeraman on 11/15/12.
//  Copyright (c) 2012 99XTechnology. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>

#import "POIObject.h"
#import "PointObject.h"
#import "DBWrapper.h"
#import "LocationService.h"

@protocol POIFinderDelegate <NSObject>
-(void)nearByPOI:(NSArray *)nearByPOI;
@end

@interface POIFinderWorker : NSObject{
    MKMapPoint prevPoint;
}

extern int const POI_SEARCH_RANGE;

@property(nonatomic)LocationService *locationService;
@property(nonatomic, weak)id<POIFinderDelegate> delegate;
@property (nonatomic)NSMutableArray *poiList;

-(void)findNearByPOI;
-(void)stop;
-(id)initWithPOIList:(NSMutableArray*)poiList;
-(NSMutableArray *)getNearByPOIList:(CLLocationCoordinate2D)coord;

@end
